#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aColor;
layout (location = 2) in vec3 aNormal;
layout (location = 3) in vec2 aTexCoords;

out vec3 normal;
out vec3 fragPos;
out vec2 texCoords;
out vec3 color;

uniform mat4 model;
uniform mat3 normalModel;
uniform mat4 view;
uniform mat3 normalView;
uniform mat4 projection;

void main()
{
    vec4 pos = model * vec4(aPos, 1.0);

    fragPos = pos.xyz;
    normal = normalize(normalModel * aNormal);
//    normal = aNormal;

    texCoords = aTexCoords;
    color = aColor;

    gl_Position = projection * view *  pos;
}